/// code : "0"
/// status : "succeed"
/// message : "操作成功"
/// error : null
/// errorData : null
/// data : null
/// failed : false
/// resultMessage : "操作成功"
/// succeed : true
 abstract class BModel{
  BModel.map(dynamic obj);
  Map<String, dynamic> toMap();
}
class BaseResponseModel implements BModel{
  String _code;
  String _status;
  String _message;
  dynamic _data;
  String _resultMessage;
  bool _succeed;

  String get code => _code;

  String get status => _status;

  String get message => _message;

  dynamic get data => _data;

  String get resultMessage => _resultMessage;

  bool get succeed => _succeed;

  BaseResponseModel(this._code, this._status, this._message,this._data,
      this._resultMessage, this._succeed);
  @override
  BaseResponseModel.map(dynamic obj) {
    this._code = obj["code"].toString();
    this._status = obj["status"].toString();
    this._message = obj["message"].toString();
    this._data = obj["data"];
    this._resultMessage = obj["resultMessage"].toString();
    this._succeed = obj["succeed"];
  }
  @override
  Map<String, dynamic> toMap() {
    var map = new Map<String, dynamic>();
    map["code"] = _code;
    map["status"] = _status;
    map["message"] = _message;
    map["data"] = _data;
    map["resultMessage"] = _resultMessage;
    map["succeed"] = _succeed;
    return map;
  }

}

class BasePagingModel implements BModel{
  int _pageNum;
  int _pageSize;
  int _size;
  int _startRow;
  int _endRow;
  int _total;
  int _pages;
  List<dynamic> _list;
  int _firstPage;
  int _prePage;
  int _nextPage;
  int _lastPage;
  bool _isFirstPage;
  bool _isLastPage;
  bool _hasPreviousPage;
  bool _hasNextPage;
  int _navigatePages;
  List<dynamic> _navigatepageNums;

  int get pageNum => _pageNum;

  int get pageSize => _pageSize;

  int get size => _size;

  int get startRow => _startRow;

  int get endRow => _endRow;

  int get total => _total;

  int get pages => _pages;

  List<dynamic> get list => _list;

  int get firstPage => _firstPage;

  int get prePage => _prePage;

  int get nextPage => _nextPage;

  int get lastPage => _lastPage;

  bool get isFirstPage => _isFirstPage;

  bool get isLastPage => _isLastPage;

  bool get hasPreviousPage => _hasPreviousPage;

  bool get hasNextPage => _hasNextPage;

  int get navigatePages => _navigatePages;

  List<int> get navigatepageNums => _navigatepageNums;

  BasePagingModel(
      this._pageNum,
      this._pageSize,
      this._size,
      this._startRow,
      this._endRow,
      this._total,
      this._pages,
      this._list,
      this._firstPage,
      this._prePage,
      this._nextPage,
      this._lastPage,
      this._isFirstPage,
      this._isLastPage,
      this._hasPreviousPage,
      this._hasNextPage,
      this._navigatePages,
      this._navigatepageNums);
  @override
  BasePagingModel.map(dynamic obj) {
    this._pageNum = obj["pageNum"];
    this._pageSize = obj["pageSize"];
    this._size = obj["size"];
    this._startRow = obj["startRow"];
    this._endRow = obj["endRow"];
    this._total = obj["total"];
    this._pages = obj["pages"];
    this._list = obj["list"];
    this._firstPage = obj["firstPage"];
    this._prePage = obj["prePage"];
    this._nextPage = obj["nextPage"];
    this._lastPage = obj["lastPage"];
    this._isFirstPage = obj["isFirstPage"];
    this._isLastPage = obj["isLastPage"];
    this._hasPreviousPage = obj["hasPreviousPage"];
    this._hasNextPage = obj["hasNextPage"];
    this._navigatePages = obj["navigatePages"];
    this._navigatepageNums = obj["navigatepageNums"];
  }
  @override
  Map<String, dynamic> toMap() {
    var map = new Map<String, dynamic>();
    map["pageNum"] = _pageNum;
    map["pageSize"] = _pageSize;
    map["size"] = _size;
    map["startRow"] = _startRow;
    map["endRow"] = _endRow;
    map["total"] = _total;
    map["pages"] = _pages;
    map["list"] = _list;
    map["firstPage"] = _firstPage;
    map["prePage"] = _prePage;
    map["nextPage"] = _nextPage;
    map["lastPage"] = _lastPage;
    map["isFirstPage"] = _isFirstPage;
    map["isLastPage"] = _isLastPage;
    map["hasPreviousPage"] = _hasPreviousPage;
    map["hasNextPage"] = _hasNextPage;
    map["navigatePages"] = _navigatePages;
    map["navigatepageNums"] = _navigatepageNums;
    return map;
  }
}
